﻿ 
﻿<input id="hCheckLogUsers" type="hidden" value="@ViewBag.CheckLogUsers" /> 
﻿<input id="hAutoActivity" type="hidden" value="@ViewBag.AutoActivity" /> 
<tr style="height: 36px; width: 40px; ">
 
    <th  style="text-align: center; font-weight: bold;width:25%">流程步骤</th>
    <th  style="text-align: center; font-weight: bold">审核意见</th>
     
</tr>
@{ IList<FCDB.Web.Models.ActivityEntityModel> modelList = (IList<FCDB.Web.Models.ActivityEntityModel>)ViewBag.ActivityCheckLogs;
   foreach (FCDB.Web.Models.ActivityEntityModel item in modelList)
   {
       Guid CurrentActivityGuid = new Guid((string)ViewBag.CurrentActivityGuid);
       if (CurrentActivityGuid != item.ActivityGUID)
       {
           //判断是否审核过
           if (item.CheckState != 0)
           {
               if (item.FormCheckLogList.Count==1)
               {
                   <tr style="height: 28px; width: 40px; @(item == modelList[modelList.Count - 1] ? "display:none" : "")">
                    @if (string.IsNullOrEmpty(item.FromDiv))
                    {
             
                        <td>@item.ActivityName</td>
                        <td>
                            @(item.CheckState == 1 ? "同意" : "不同意")<span> @item.CheckContent</span>
                            <br />
                            <span style="width: 100%; text-align: right;">
                                @item.CheckUserName &nbsp;&nbsp;&nbsp;@item.CheckTime
                            </span>
                        </td>  
                    }
                    else
                    { 
                        string FromDiv = "div" + item.FromDiv;
                        <td colspan="2"  style="  padding:0px; ">
                            <div id="@FromDiv" class="ProccessActiveContainer">
                                <input type="hidden" name="@(FromDiv + "CheckState")" id="@(FromDiv + "CheckState")" value="@item.CheckState" />
                                <input type="hidden" name="@(FromDiv + "CheckContent")" id="@(FromDiv + "CheckContent")" value="@item.CheckContent" />
                            </div>
                        </td>
                    }
                </tr> 
                }else
                {
                     <tr style="width: 40px; @(item == modelList[modelList.Count - 1] ? "display:none" : "")">
                         <td>@item.ActivityName</td>
                         <td>
                             <table>
                                  @foreach(var m in item.FormCheckLogList)
                                  {
                                      <tr style="height: 28px;">
                                          <td>
                                              @(m.CheckState == 1 ? "同意" : "不同意")<span> @m.CheckContent</span>
                                              <br />
                                              <span style="width: 100%; text-align: right;">
                                                  @m.CheckUserName &nbsp;&nbsp;&nbsp;@m.CheckTime
                                              </span>
                                          </td>
                                      </tr>
                                  }
                             </table>
                         </td>
                     </tr>
               } 
           }
           else
           {
               
     <tr  style="height: 36px; @(item == modelList[modelList.Count - 1] ? "display:none" : "")">
        @if (string.IsNullOrEmpty(item.FromDiv))
        {
            <td>@item.ActivityName</td>
            <td></td>
             
        }
        else
        { 
            string FromDiv = "div" + item.FromDiv;
            <td colspan="2"  style="  padding:0px; ">
                <div id="@FromDiv" class="ProccessActiveContainer "></div>
            </td> 
        } 
    </tr> 
           }
       }
       else
       { 
   <tr style="height: 36px; width: 40px; @(item == modelList[modelList.Count - 1] ? "display:none" : "")">
       
        @if (string.IsNullOrEmpty(item.FromDiv))
        {
            <td>@item.ActivityName</td>
            <td>
                <form action="@Url.Action("SubmitFormCheck", "Form")"  method="post"  id="checkfrm"  style="@(string.IsNullOrEmpty(item.FromDiv) ? "" : "display:none")">
                    同意<input id="txtCheckState" checked="checked" type="radio" name="CheckState" value="1" />不同意<input id="txtCheckState" type="radio" name="CheckState" value="2" />
                    <br />
                    <textarea id="txtCheckContent" name="CheckContent" class="in_c1"  style="width: 98%; height: 30px;" rows="2"></textarea>
                    <input id="checkSendUserID" name="SendUserID" type="hidden"  value="@item.SendUserID"/>
                    <input id="checkCreateTime" name="CreateTime" type="hidden"  value="@(item.CreateTime.HasValue?item.CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss"):"")"/>
                    <input id="checkSendUserName" name="SendUserName" type="hidden"  value="@item.SendUserName"/>
                     <input id="hAppInstanceName" value='@ViewBag.Title' name="AppInstanceName" type="hidden" />
                    <input id="hProcessGuid" value='@Request["ProcessGuid"]' name="ProcessGuid" type="hidden" />
                    <input id="hAppInstanceID" value='@Request["AppInstanceID"]' name="AppInstanceID" type="hidden" />
                    <input id="hActivityInstanceID" value='@Request["ActivityInstanceID"]' name="ActivityInstanceID" type="hidden" />
                    <input id="hActivityGuid" value='@Request["ActivityGuid"]' name="ActivityGuid" type="hidden" />
                </form>
            </td>
        }
       <td colspan="2"  style=" padding:0px;">

           @if (!string.IsNullOrEmpty(item.FromDiv))
           {

               string FromDiv = "div" + item.FromDiv;
               <div id="@FromDiv" class="ProccessActiveContainer curentContainer"></div>
               <form action="@Url.Action("SubmitFormCheck", "Form")"  method="post"  id="checkfrm"  style="display:none">
                   同意<input id="txtCheckState" checked="checked" type="radio" name="CheckState" value="1" />不同意<input id="txtCheckState" type="radio" name="CheckState" value="2" />
                   <br />
                   <textarea id="txtCheckContent" name="CheckContent" class="in_c1"  style="width: 98%; height: 30px;" rows="2"></textarea>
                   <input id="checkSendUserID" name="SendUserID" type="hidden"  value="@item.SendUserID"/>
                   <input id="checkCreateTime" name="CreateTime" type="hidden"  value="@(item.CreateTime.HasValue?item.CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss"):"")"/>
                   <input id="checkSendUserName" name="SendUserName" type="hidden"  value="@item.SendUserName"/>
                   <input id="hAppInstanceName" value='@ViewBag.Title' name="AppInstanceName" type="hidden" />
                   <input id="hProcessGuid" value='@Request["ProcessGuid"]' name="ProcessGuid" type="hidden" />
                   <input id="hAppInstanceID" value='@Request["AppInstanceID"]' name="AppInstanceID" type="hidden" />
                   <input id="hActivityInstanceID" value='@Request["ActivityInstanceID"]' name="ActivityInstanceID" type="hidden" />
                   <input id="hActivityGuid" value='@Request["ActivityGuid"]' name="ActivityGuid" type="hidden" />
               </form>
            } 
       </td>
    </tr>    
       }
   }
}
